//package com.letoken.platform.job.controller;
//
//import com.letoken.platform.job.jobhandler.monitor.WithdrawFailAlert;
//import com.letoken.platform.pub.res.ApiResponse;
//import com.letoken.platform.pub.res.web3.ResultTransaction;
//import com.letoken.platform.repo.admin.req.user.QueryAppUserListReq;
//import com.letoken.platform.repo.web3.EvmProvider;
//import com.letoken.platform.repo.web3.provider.IEvmProvider;
//import com.letoken.platform.repo.web3.util.EvmScanUtil;
//import com.letoken.platform.repo.web3.util.EvmUtil;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
///**
// * @author letokenlabs
// * @date 2022/12/10$
// */
//@RestController
//@RequestMapping("/test")
//@Api(tags = "test")
//public class TestController {
//
//    @Autowired
//    WithdrawFailAlert withdrawFailAlert;
//
//    @PostMapping("/test")
//    @ApiOperation(value = "test", notes = "test")
//    public ApiResponse test(@RequestBody @Validated QueryAppUserListReq req) {
//        return ApiResponse.create();
//    }
//

//    @GetMapping("/alert")
//    @ApiOperation(value = "test", notes = "test")
//    public ApiResponse alert() {
//        withdrawFailAlert.withdrawFailAlert();
//        return ApiResponse.create();
//    }
//
//    @GetMapping("/balance/evm")
//    @ApiOperation(value = "balance/evm", notes = "evm")
//    public ApiResponse balance_evm(@RequestParam(name = "netType") String netType,
//                                   @RequestParam(name = "address") String address) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmUtil.getBalance(address, evm.getWeb3j()));
//    }
//
//    @GetMapping("/balance/scan")
//    @ApiOperation(value = "balance/scan", notes = "evm")
//    public ApiResponse balance_scan(@RequestParam(name = "netType") String netType,
//                                   @RequestParam(name = "address") String address) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmScanUtil.getBalance(address, evm.getWeb3ChainProvider()));
//    }
//
//    @GetMapping("/block_num/evm")
//    @ApiOperation(value = "block_num/evm", notes = "evm")
//    public ApiResponse block_num_evm(@RequestParam(name = "netType") String netType) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmUtil.blockHeight(evm.getWeb3j()));
//    }
//
//    @GetMapping("/block_num/scan")
//    @ApiOperation(value = "block_num/scan", notes = "evm")
//    public ApiResponse block_num_scan(@RequestParam(name = "netType") String netType) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmScanUtil.blockHeight(evm.getWeb3ChainProvider()));
//    }
//
//    @GetMapping("/blocks/moralis")
//    @ApiOperation(value = "blocks/moralis", notes = "evm")
//    public ApiResponse blocks_moralis(@RequestParam(name = "num") String num) {
//        List<ResultTransaction> list = EvmProvider.getInstance("bsc").getBlockTokenTransactionsByMoralis("0x55d398326f99059ff775485246999027b3197955",
//                num);
//        return ApiResponse.create(list);
//    }
//
//    @GetMapping("/blocks/web3")
//    @ApiOperation(value = "blocks/web3", notes = "evm")
//    public ApiResponse blocks_web3(@RequestParam(name = "num") String num) {
//        List<ResultTransaction> list = EvmProvider.getInstance("bsc").getBlockTokenTransactions("0x55d398326f99059ff775485246999027b3197955",
//                num);
//        return ApiResponse.create(list);
//    }
//}